// 在岗巡查
import httpAPI from '../../utils/http.js'

export default {
  /**
   * 查询考勤规则
   */
  getTime() {
    return httpAPI.get('/system/attendance/rules-setting')
  },
  /**
   * 历史列表
   */
  getHistoryList (projectId, date) {
    return httpAPI.get(`system/check-point/${projectId}/check-log/history?date=${date}`, )
  },
  /**
   * @param {Object} date 时间
   * @param {Object} checkType 签到类型
   * 历史详情
   */
  getHistoryData(date, checkType) {
    return httpAPI.get(`system/check-point/${projectId}/check-log/detail?date=${date}&checkType=${checkType}`)
  },
  /**
   * @param {Object} projectId 项目id
   * 扫描签到
   */
  addSign(projectId, params) {
    return httpAPI.post(`system/check-point/${projectId}/check-log/check-in`, params)
  },
  /**
   * @param {Object} id 点位id
   * 查询点位详情
   */
  pointDetails(id) {
    return httpAPI.get(`system/check-point/point/detail?checkPointId=${id}`)
  },
  /**
   * @param {Object} projectId 项目id
   * 加班状态
   */
  SignStatus(projectId) {
    return httpAPI.get(`/system/check-point/${projectId}/check-log/over-time-status`)
  }
}
